package factory.bean;

import java.math.BigDecimal;

public class Truck extends Vehicle{

    private BigDecimal price;
    private String truckName;
    private Double capacity;

    public Truck(BigDecimal price, String truckName, Double capacity) {
        this.price = price;
        this.truckName = truckName;
        this.capacity = capacity;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String gettruckName() {
        return truckName;
    }

    public void settruckName(String truckName) {
        this.truckName = truckName;
    }

    public Double getCapacity() {
        return capacity;
    }

    public void setCapacity(Double capacity) {
        this.capacity = capacity;
    }

    @Override
    public void showInfo() {
        System.out.println("卡车品牌名称:" + truckName + ", 卡车价格:" + price + "元, 卡车载重能力:" + capacity + "KG");
    }
}
